#ifndef CMEMORYPROF_H
#define CMEMORYPROF_H
#define NULL 0
#define USEDBIT 2147483648

class CMemoryProfessor{
public:
	struct MemHeader{
		unsigned int m_unSize;
		MemHeader* m_pPrev;
		MemHeader* m_pNext;
	};
	struct MemFooter{
		int m_nSize;
	};

private:
	char* m_pMemory;
	unsigned int m_unSize;
	MemHeader* m_pFreeHeader;
	MemFooter* m_pFoot;

	

public:
	CMemoryProfessor();
	~CMemoryProfessor();
	void Init(unsigned int unBytesAlloted);
	char* Allocate(unsigned int unAllocSize);
	void Deallocate(void* p_vData);

};

#endif